package com.test2;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by Admin on 9/16 0016.
 */
public class Main {
    public static void main(String[] args) {
        ApplicationContext cox=new ClassPathXmlApplicationContext("test2.xml");
//        Address address= (Address) cox.getBean("address");
//        System.out.println(address);
        Address address2= (Address) cox.getBean("address2");
        System.out.println(address2);

        Person person=cox.getBean(Person.class);
        System.out.println(person);
    }
}
